class Admin < ActiveRecord::Base
	validates_length_of :name, :within => 3..40
    validates_length_of :password, :within => 5..40
    validates_presence_of :name, :username, :email, :password, :password_confirmation
    validates_format_of :email, :with => %r{^(?:[_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-zA-Z0-9\-\.]+)*(\.[a-z]{2,4})$}i
    validates_uniqueness_of :username, :email
    validates_confirmation_of :password
	
end
